#include "cRingDisconnect.h"

#include <stdlib.h>
#include <sstream>
#include <stdio.h>

#include <Poco/DOM/Document.h>
#include <Poco/DOM/NodeIterator.h>
#include "misc/Interface.h"
#include "misc/Debug.h"
#include "client/Client.h"
/*********************************************************/
void cRingDisconnect::execute()
{
	// Clients don't execute disconnects ... do nothing here
}
/*********************************************************/
std::string cRingDisconnect::serialize() const
{
	Client& c = Client::Instance();
	std::ostringstream		ostr;
	id = c.getID();

	ostr << "<GS id='" << id << "'>";
	ostr << "<RingDisconnect>" << ringName << "</RingDisconnect>";
	ostr << "</GS>";

	return( ostr.str() );
}
/*********************************************************/
void cRingDisconnect::deserialize(Poco::XML::NodeIterator& it)
{
	Poco::XML::Node* pNode = it.previousNode();
	ringName = pNode->innerText();
}
/*********************************************************/
void cRingDisconnect::setName(const std::string& n)
{
	ringName = n;
}
/*********************************************************/
std::string cRingDisconnect::getName() const
{
	return ringName;
}
/*********************************************************/
